<template>
  <div>
    <h2>Play</h2>
    <div>
      <button @click="$router.push('/play/item')">KTV</button>

      <button
        @click="
          $router.push({
            name: 'PlayItem',
          })
        "
      >
        足球
      </button>

      <button
        @click="
          $router.push({
            path: '/play/item',
          })
        "
      >
        篮球
      </button>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "Play",
  mounted() {
    console.log("Play--mounted");
  },
  beforeDestroy() {
    console.log("Play--beforeDestroy");
  },
  activated() {
    console.log("Play---激活");
  },
  deactivated() {
    console.log("Play---失活");
  },
};
</script>

<style></style>
